#include "scheduler/fallback_scheduler.h"
#include "../policy/policy_factory.h"
#include "../policy/behavior_tree/behavior_tree_fallback_policy.h"

namespace scheduler
{
FallbackScheduler::FallbackScheduler(const std::string &name)
    : AbstractScheduler(name)
{
    schedule_policy_ = policy::PolicyFactory<policy::BehaviorTreeFallbackPolicy>::createPolicy(name + "_policy");
}
bool FallbackScheduler::setTask(const task::AbstractTaskConstPtr &task)
{
    EASE_ERROR("fallback scheduler cannot set task");
    throw std::runtime_error("fallback scheduler cannot set task");
}
bool FallbackScheduler::setScheduler(const AbstractSchedulerConstPtr &scheduler)
{
    EASE_ERROR("fallback scheduler cannot set scheduler");
    throw std::runtime_error("fallback scheduler cannot set scheduler");
}
FallbackScheduler::~FallbackScheduler() = default;
}
